package com.kuaimacode.kframework.mybatis.models.coupon;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kuaimacode.kframework.mybatis.models.user.User;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Administrator
 * @date 2019/03/25
 */
@TableName("user_coupon")
@Data
public class UserCoupon implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	@ApiModelProperty(value = "用户id")
	@TableField("user_id")
	private Long userId;
	@ApiModelProperty(value = "优惠券id")
	@TableField("coupon_id")
	private Long couponId;
	@ApiModelProperty(value = "优惠券使用状态")
	@TableField("state")
	private Integer state;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "开始日期")
	@TableField("start_time")
	private Date startTime;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "到期日期")
	@TableField("end_time")
	private Date endTime;

	@ApiModelProperty(value = "优惠券名称")
	@TableField(exist = false)
	private String name;
	@ApiModelProperty(value = "优惠券类型")
	@TableField(exist = false)
	private Integer type;
	@ApiModelProperty(value = "最低使用金额")
	@TableField(exist = false)
	private BigDecimal minGoodsAmount;
	@ApiModelProperty(value = "优惠金额")
	@TableField(exist = false)
	private BigDecimal amount;

	@ApiModelProperty(value = "使用范围")
	@TableField(exist = false)
	private String useScope;
	@ApiModelProperty(value = "使用范围")
	@TableField(exist = false)
	private String useScopeChildType;

	@ApiModelProperty(value = "使用范围描述")
	@TableField(exist = false)
	private String useScopeDesc;

	@ApiModelProperty(value = "描述")
	@TableField(exist = false)
	private String desc;

	@ApiModelProperty(value = "是否即将过期 0 否 1 是")
	@TableField(exist = false)
	private String expireSoon;

	@ApiModelProperty(value = "用户手机号")
	@TableField(exist = false)
	private String userName;


	@ApiModelProperty(value = "发放时间")
	@TableField("create_at")
	private Date createAt;
	@ApiModelProperty(value = "发放人")
	@TableField("create_by")
	private Long createBy;







}
